#include <iostream>
#include <queue>
#include <map>
#include <unordered_map>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <cstring>
#include <set>
#include <unordered_set>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
const int INF=0x3f3f3f3f;
string s;
int main()
{
	cin>>s;
	int idx=1;
	int sum=0;
	for(int i=0;i<s.size()-1;i++)
	{
		if(s[i]=='-') continue;
		sum=sum+(s[i]-'0')*idx;
		idx++;
	}
	if(sum%11==s[s.size()-1]-'0' || (sum%11==10 && s[s.size()-1]=='X'))
	{
		cout<<"Right";
	}
	else
	{
		for(int i=0;i<s.size()-1;i++)
		{
			cout<<s[i];
		}
		if(sum%11==10) cout<<'X';
		else cout<<sum%11;
	}

	return 0;
}

